enum PageState { idle, loading, success, empty, error, networkError, permissionError }

extension PageStateX on PageState {
  bool get isLoading => this == PageState.loading;
  bool get isSuccess => this == PageState.success;
  bool get isEmpty => this == PageState.empty;
  bool get isError => this == PageState.error || this == PageState.networkError || this == PageState.permissionError;
}
